<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @mixin Model
 */
class Notice extends Model
{
    use SoftDelete;
    protected $table = 'think_notice';
    protected $pk = 'id';
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';//创建时间
    protected $updateTime = 'update_time';//更新时间
    protected string $deleteTime = 'delete_time';//删除时间

    public const TYPE_LIST = [
        1 => '系统消息',
        2 => '活动消息',
        3 => '系统通知',
    ];

    /**
     * 发布状态 0：未发布
     */
    public const STATE_DEFAULT = 0;

    /**
     * 发布状态 1：已发布
     */
    public const STATE_PUBLISHED = 1;

    protected $hidden = ['delete_time', 'update_time'];

}
